Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
azure-storage
Advanced tools
The azure-storage npm package is a client library for working with Azure Storage services, including Blob, File, Queue, and Table storage. It allows developers to interact with these services programmatically, enabling tasks such as uploading and downloading files, managing queues, and working with table data.
Blob Storage
Blob Storage allows you to store large amounts of unstructured data, such as text or binary data. The code sample demonstrates how to upload a text file to a blob container.
const azure = require('azure-storage');
const blobService = azure.createBlobService();
// Upload a text file to a container
blobService.createBlockBlobFromText('mycontainer', 'myblob', 'Hello, World!', function(error, result, response) {
if (!error) {
console.log('Blob uploaded successfully');
}
});
File Storage
File Storage provides a way to store and access files in the cloud. The code sample shows how to create a file share and upload a text file to it.
const azure = require('azure-storage');
const fileService = azure.createFileService();
// Create a share and upload a file
fileService.createShareIfNotExists('myshare', function(error, result, response) {
if (!error) {
fileService.createFileFromText('myshare', '', 'myfile', 'Hello, World!', function(error, result, response) {
if (!error) {
console.log('File uploaded successfully');
}
});
}
});
Queue Storage
Queue Storage provides reliable messaging for workflow processing and communication between different parts of your application. The code sample demonstrates how to create a queue and add a message to it.
const azure = require('azure-storage');
const queueService = azure.createQueueService();
// Create a queue and add a message
queueService.createQueueIfNotExists('myqueue', function(error, result, response) {
if (!error) {
queueService.createMessage('myqueue', 'Hello, World!', function(error, result, response) {
if (!error) {
console.log('Message added to queue');
}
});
}
});
Table Storage
Table Storage offers a NoSQL key-value store for rapid development using massive semi-structured datasets. The code sample shows how to create a table and insert an entity into it.
const azure = require('azure-storage');
const tableService = azure.createTableService();
// Create a table and insert an entity
const entGen = azure.TableUtilities.entityGenerator;
const task = {
PartitionKey: entGen.String('tasks'),
RowKey: entGen.String('1'),
description: entGen.String('Task 1'),
dueDate: entGen.DateTime(new Date(Date.UTC(2023, 10, 1)))
};
tableService.createTableIfNotExists('mytable', function(error, result, response) {
if (!error) {
tableService.insertEntity('mytable', task, function(error, result, response) {
if (!error) {
console.log('Entity inserted');
}
});
}
});
The aws-sdk package is the official AWS SDK for JavaScript, providing a comprehensive set of tools for interacting with AWS services, including S3 for object storage, DynamoDB for NoSQL databases, SQS for message queuing, and more. It is similar to azure-storage in that it provides a way to interact with cloud storage and other services, but it is specific to Amazon Web Services.
The google-cloud package is the official Google Cloud client library for Node.js. It provides tools for interacting with Google Cloud services, such as Google Cloud Storage for object storage, Firestore for NoSQL databases, and Pub/Sub for messaging. Like azure-storage, it offers a way to interact with cloud storage and other services, but it is specific to Google Cloud Platform.
The ibm-cos-sdk package is the official SDK for IBM Cloud Object Storage. It provides tools for interacting with IBM's cloud storage services, allowing for operations such as uploading and downloading files, managing buckets, and more. It is similar to azure-storage in that it provides a way to interact with cloud storage, but it is specific to IBM Cloud.
This project provides the legacy Node.js package azure-storage
which is browser compatible to consume and manage Microsoft Azure Storage Services like Azure Blob Storage, Azure Queue Storage, Azure Files and Azure Table Storage
Please note, newer packages
@azure/storage-blob
,@azure/storage-queue
and@azure/storage-file
are available as of November 2019 and@azure/data-tables
is available as of June 2021 for the individual services. While the legacyazure-storage
package will continue to receive critical bug fixes, we strongly encourage you to upgrade.
Below are a set of links with information on both the latest and legacy packages for the different Storage services from Azure. For more, please read State of the Azure SDK 2021
Package | Version | Description | API Reference Links | Migration Guide Links |
---|---|---|---|---|
@azure/storage-blob | v12 | The next generation SDK for Azure Blob Storage | API Reference for Blob SDK | Migration Guide from azure-storage to @azure/storage-blob |
@azure/storage-queue | v12 | The next generation SDK for Azure Queue Storage | API Reference for Queues SDK | Migration Guide from azure-storage to @azure/storage-queue |
@azure/storage-file-share | v12 | The next generation SDK for Azure Files | API Reference for Files SDK | Migration Guide from azure-storage to @azure/storage-file-share |
@azure/data-tables | v12 | The next generation SDK for Azure Table Storage | API Reference for Tables SDK | Migration Guide from azure-storage to @azure/data-tables |
azure-storage | v2 | Legacy Storage SDK in this repository (Blob/Queue/File/Table, callback style) | API Reference for legacy Storage SDK | |
@azure/arm-storage | v7 & above | Management SDKs including Storage Resource Provider APIs | API Reference for Storage Management SDK |
FAQs
Microsoft Azure Storage Client Library for Node.js
The npm package azure-storage receives a total of 147,191 weekly downloads. As such, azure-storage popularity was classified as popular.
We found that azure-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.